﻿#region Header

/*
Remote views based on linq
By

Pascal Hauser 
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

and

Raphael Gfeller
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

*/

#endregion

#region Usings

using Sebastof.Types;

#endregion

namespace Sebastof.Services.Interfaces {
	/// <summary>
	/// An implementation of this service interface holds change sets temporarily, until they are submitted/commited to the server.
	/// The AddChangeSet methods will be called by an ISebastofApplicationObject. GetChangeSet and RemoveChangeSets will be called 
	/// by the object tracker.
	/// </summary>
	public interface IObjectTrackerMetadataService {
		#region Public Methods

		EChangeState GetChangeState(object obj);
		void SetChangeState(object obj, EChangeState state);

		ChangeSet[] GetChangeSet(object obj);
		ChangeCollectionSet[] GetChangeCollectionSet(object obj);
		void SetChangeSet(object obj, ChangeSet[] changeSets);
		void AddChangeSet(object obj, ChangeSet changeSet);
		void AddChangeSet(object obj, ChangeCollectionSet changeSet);
		void AddChangeSet(ChangeSet changeSet);
		//for non-existing objects (i.e. on a view data of a object can be loaded without fully loading the object

		void RemoveChangeSets(object obj);

		#endregion
	}
}